package com.berchen.数据结构.二叉树;

import lombok.Data;

/**
 * 树节点
 */
@Data
public class TreeNode {

    private int id;
    private String name;
    TreeNode left;  // 左子节点
    TreeNode right; // 右子节点

    public TreeNode(int id, String name) {
        this.id = id;
        this.name = name;
    }

    @Override
    public String toString() {
        return "TreeNode{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }
}
